<template>
	<div>
		<h1 ref="title">欢迎来到尚硅谷！</h1>
		<button @click="showText">点我提示上方的内容</button>
		<hr>
		<Person ref="ren"></Person>
		<button @click="test">点我测试一下</button>
	</div>
</template>

<script>
	import Person from './components/Person.vue'

	export default {
		name:'App',
		components:{Person},
		methods: {
			showText(e){
				console.log(this.$refs.title.innerText)
			},
			test(){
				console.log(this.$refs.ren)
			}
		},
	}
</script>
